<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<!-- row -->
<div class="row">
    <article class="col-sm-12 col-md-12 col-lg-12 sortable-grid ui-sortable">
        <!-- Widget ID (each widget will need unique ID)-->
        <div class="jarviswidget well" id="wid-id-3" data-widget-colorbutton="false" data-widget-editbutton="false"
             data-widget-togglebutton="false" data-widget-deletebutton="false"
             data-widget-fullscreenbutton="false" data-widget-custombutton="false" data-widget-sortable="false">
            <!-- widget options:
            usage: <div class="jarviswidget" id="wid-id-0" data-widget-editbutton="false">

            data-widget-colorbutton="false"
            data-widget-editbutton="false"
            data-widget-togglebutton="false"
            data-widget-deletebutton="false"
            data-widget-fullscreenbutton="false"
            data-widget-custombutton="false"
            data-widget-collapsed="true"
            data-widget-sortable="false"

            -->
            <header>

            </header>

            <!-- widget div-->
            <div>
                <!-- widget edit box -->
                <div class="jarviswidget-editbox">
                    <!-- This area used as dropdown edit box -->

                </div>
                <!-- end widget edit box -->

                <!-- widget content -->
                <div class="widget-body ">
                    <div class="row">
                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                            <span class="font-md text-primary"><spring:message code="USER_REGISTER"/></span>
                        </div>
                    </div>

                    <hr class="simple">
                    <!--row-->
                    <div class="row">
                        <form id="user-form" action="user/register" class="smart-form" method="post">
                            <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
                                <fieldset>
                                    <%--<div class="row">--%>
                                    <%--<div class="col-md-12">--%>
                                    <section>
                                        <label class="label">
                                            <spring:message var="m_loginName" code="USER_LOGINNAME"/>
                                            ${m_loginName}
                                            <span id="valierrLoginName" style="color:red">*</span>
                                        </label>
                                        <label class="input">
                                            <input type="text" name="loginName" id="loginName" maxlength="<spring:message code='GLOBAL_FIELD_MAX'/>"
                                                   placeholder="<spring:message code='USER_LONGI_NAME_REGISTER'/>">
                                        </label>
                                    </section>
                                    <section>
                                        <label class="label">
                                            <spring:message var="m_name" code="USER_NAME"/>
                                            ${m_name}
                                            <span id="valierrName" style="color:red">*</span>
                                        </label>
                                        <label class="input">
                                            <input type="text" name="name" id="name" maxlength="<spring:message code='GLOBAL_FIELD_MAX'/>"
                                                   placeholder="<spring:message code='USER_NAME_REGISTER'/>">
                                        </label>
                                    </section>
                                    <section>
                                        <label class="label">
                                            <spring:message var="m_phone" code="USER_PHONE"/>
                                            ${m_phone}
                                        </label>
                                        <label class="input">
                                            <input type="text" id="phone" name="phone" maxlength="<spring:message code='GLOBAL_FIELD_MAX'/>"
                                                   placeholder="<spring:message code="USER_PHONE_REGISTER"/> ">
                                        </label>
                                    </section>
                                    <section>
                                        <label class="label">
                                            <spring:message var="m_description" code="USER_DESCRIPTION"/>
                                            ${m_description}
                                        </label>
                                        <label class="input">
                                            <input type="text" id="description" name="description" maxlength="<spring:message code='GLOBAL_FIELD_MAX'/>"
                                                   placeholder="<spring:message code="USER_DESCRIPTION_REGISTER"/> ">
                                        </label>
                                    </section>
                                    <section>
                                        <label class="label">
                                            <spring:message var="m_password" code="USER_PASSWORD"/>
                                            ${m_password}
                                            <span id="valierrPassword" style="color:red">*</span>
                                        </label>
                                        <label class="input">
                                            <%--<i class="icon-append fa fa-user"></i>--%>
                                                <input type="password" name="password" id="password" maxlength="<spring:message code='GLOBAL_FIELD_MAX'/>"
                                                   placeholder="<spring:message code='USER_PASSWORD_REGISTER'/>">
                                        </label>
                                    </section>
                                    <section>
                                        <label class="label">
                                            <spring:message var="m_repassword" code="USER_REPASSWORD"/>
                                            ${m_repassword}
                                            <span id="valierrRepassword" style="color:red">*</span>
                                        </label>
                                        <label class="input">
                                            <%--<i class="icon-append fa fa-user"></i>--%>
                                                <input type="password" name="repassword" maxlength="<spring:message code='GLOBAL_FIELD_MAX'/>"
                                                   placeholder="<spring:message code='USER_PASSWORD_SUBMIT_REGISTER'/>">
                                        </label>
                                    </section>
                                    <div class="form-group">
                                        <label>
                                            <spring:message var="m_email" code="USER_EMAIL"/>
                                            ${m_email}
                                            <span id="valierrEmail" style="color:red">*</span>
                                        </label>

                                       <%-- <div class="input-group">--%>
                                            <label class="input">
                                                <input class="form-control" type="text" name="email" maxlength="<spring:message code='GLOBAL_FIELD_MAX'/>"
                                                       placeholder="<spring:message code='USER_EMAIL_REGISTER'/>">
                                            </label>
                                               <%-- <span class="input-group-addon">
                                                    <span class="onoffswitch">
                                                        <input id="st3" class="onoffswitch-checkbox" type="checkbox"
                                                               name="isSendEmail"/>
                                                        <label class="onoffswitch-label" for="st3">
                                                            <span class="onoffswitch-inner"
                                                                  data-swchoff-text="<spring:message code='GLOBAL_BUTTON_NO'/>"
                                                                  data-swchon-text="<spring:message code='GLOBAL_BUTTON_YES'/>"></span>
                                                            <span class="onoffswitch-switch"></span>
                                                        </label>
                                                    </span>
                                                </span>--%>
                                       <%-- </div>--%>
                                        <div class="note">
                                            <spring:message code="USER_EDIT_EMAIL"/>
                                        </div>
                                    </div>
                                    <br/>

                                    <div class="form-group">
                                        <label>
                                            <spring:message var="m_status" code="USER_STATUS"/>
                                            ${m_status}
                                        </label><br>
                                        <input type="hidden" id="status" name="status" value=""/>

                                        <div class="btn-group">
                                            <button type="button" class="btn btn-default u-status"
                                                    data-status="btn-success" data-value="ACTIVE">
                                                <spring:message var="m_status_active" code="USER_STATUS_ACTIVE"/>
                                                ${m_status_active}
                                            </button>
                                            <button type="button" class="btn btn-default u-status"
                                                    data-status="btn-warning" data-value="LOCK">
                                                <spring:message var="m_status_lock" code="USER_STATUS_LOCK"/>
                                                ${m_status_lock}
                                            </button>
                                            <button type="button" class="btn btn-default u-status"
                                                    data-status="btn-danger" data-value="DISABLE">
                                                <spring:message var="m_status_disable" code="USER_STATUS_DISABLE"/>
                                                ${m_status_disable}
                                            </button>
                                        </div>
                                    </div>
                                </fieldset>
                                <footer>
                                    <div class="text-right form-action-bar">
                                        <a href="#user" class="btn btn-default"><i class="fa fa-rotate-left"></i>
                                            <spring:message code="GLOBAL_BUTTON_CANCEL"/></a>
                                        <button type="submit" class="btn btn-primary">
                                            <i class="fa fa-save"></i> <spring:message code="GLOBAL_BUTTON_SAVE"/>
                                        </button>
                                    </div>
                                </footer>
                                <div class="message">
                                    <i class="fa fa-check fa-lg"></i>

                                    <p>
                                        <spring:message code="GLOBAL_SUCCESS_ADDED"/>
                                    </p>
                                    <a href="javascript:void(0);" id="lk_addnew"><spring:message code="GLOBAL_ADD_ANOTHER"/></a>
                                    <a href="#user"> <spring:message code="GLOBAL_TURNBACK"/></a>
                                </div>
                            </div>
                        </form>
                    </div>
                    <!--end row-->
                </div>
                <!-- end widget content -->
            </div>
            <!-- end widget div -->
        </div>
        <!-- end widget -->
    </article>

</div>
<!-- end row -->
<script src="js/core/business/user/userCreateInit.js"></script>
